DEFINITION MODULE AppointmentBook;

   (* This module defines procedures used for manipulating the *)
   (* Appointment Book accessory.                              *)


   PROCEDURE Initialize ();

      (* Initialize the AppointmentBook module. *)


   PROCEDURE OwnsWindow ( WindowId : INTEGER ) : BOOLEAN;

      (* Return TRUE if the Appointment Book owns the window *)
      (* specified by "WindowId", or FALSE otherwise.        *)


   PROCEDURE Open ( UseCurrentDate : BOOLEAN;
                    NewDate        : CARDINAL );
 
      (* Open the Appointment Book.  If the Appointment Book is      *)
      (* already opened, then top the Appointment Book window.       *)
      (* If "UseCurrentDate" is true, the current day's appointment  *)
      (* schedule will be displayed.  Otherwise, if "UseCurrentDate" *)
      (* is false, "NewDate" contains the desired date formatted     *)
      (* according to the standard Atari system convention.          *)


   PROCEDURE Close;

      (* Close the Appointment Book window. *)


   PROCEDURE ProcessMessageEvent ( VAR MsgBuffer : ARRAY OF INTEGER );

      (* Process a message event not relating to a menu. *)


   PROCEDURE ProcessButtonEvent ( MouseButton : INTEGER;
                                  ModifierKey : INTEGER;
                                  Clicks      : INTEGER );

      (* Process a mouse button event. *)


   PROCEDURE ProcessKeyboardEvent ( Key         : INTEGER;
                                    ModifierKey : INTEGER );

      (* Process a keyboard event. *)


   TYPE CalenderType  = ARRAY [1..31] OF BOOLEAN;

   PROCEDURE DatesWithAppts (
      Month         : CARDINAL;
      Year          : CARDINAL;
      VAR DateArray : CalenderType );

      (* Find the dates with appointments for the current month. *)


END AppointmentBook.

